function [val_Min , val_Max] = DetermineMinMaxManifoldProjection(S,u,DU,lag_point_Number)

MoonPosition = 1-u;

if lag_point_Number == 'L1'
    for j = 1:length(S)
        for k = 1:size(S{j},2)
            x = S{j}(1,k);
            y = S{j}(2,k);
            theta = atan2d(y,x);
            projectedValues{j}(:,k) = Rotation([0;0;1],-theta,'Degrees')*S{j}(1:3,k);
            if projectedValues{j}(1,k) > MoonPosition
                projectedValues{j} = nan;
                break
            end
        end
        min_temp(j) = min(projectedValues{j}(1,:));
        max_temp(j) = max(projectedValues{j}(1,:));
    end
    
elseif lag_point_Number == 'L2'
    for j = 1:length(S)
        for k = 1:size(S{j},2)
            x = S{j}(1,k);
            y = S{j}(2,k);
            theta = atan2d(y,x);
            projectedValues{j}(:,k) = Rotation([0;0;1],-theta,'Degrees')*S{j}(1:3,k);
            if projectedValues{j}(1,k) < MoonPosition
                projectedValues{j}(:,k) = nan;
            end
        end
        min_temp(j) = min(projectedValues{j}(1,:));
        max_temp(j) = max(projectedValues{j}(1,:));
    end
end


val_Min = min(min_temp)*DU;
val_Max = max(max_temp)*DU;

end